<script setup lang="ts">
import { ref } from 'vue'
import XueyanButton from "./xueyan_button/XueyanButton.vue";
import XueyanInput from './xueyan_input/XueyanInput.vue'
import XueyanCard from './xueyan_card/XueyanCard.vue'
import XueyanWangeditor from "./xueyan_wangeditor/XueyanWangeditor.vue"
import UseXueyanMessage from "./xueyan_message/UseXueyanMessage";
import XueyanPager from "./xueyan_pager/XueyanPager.vue";

defineProps<{ msg: string }>()

const count = ref(0)

const inputTest = ref('test12')

const richText = ref('<h3><span style="color: rgb(255, 173, 210);">妍妍</span>是我的女朋友</h3><p><strong>江城子·密州出猎</strong></p><p>【宋】苏轼</p><p>老夫聊发少年狂，左牵黄，右擎苍。锦帽貂裘，千骑卷平冈。为报倾城随太守，亲射虎，看孙郎。</p><p>酒酣胸胆尚开张，鬓微霜，又何妨！持节云中，何日遣冯唐？会挽雕弓如满月，西北望，射天狼。</p>')

const alerting = () => {
  console.log('输入框内容发生变化')
}

const showMessage = () => {
  UseXueyanMessage({ type: "info", text: "这是一条成功提示",duration: 2000 })
}
</script>

<template>
  <h1>{{ msg }}</h1>
  <xueyan-pager :size="10" :count="70"></xueyan-pager>
  <xueyan-button name="123" size='medium' type="primary" plain angle='round'></xueyan-button>
  <br>
  输入框内容为:{{inputTest}}
  <br>
  <xueyan-input v-model='inputTest'></xueyan-input>
  <br>
  <br>
  <xueyan-card top-icon="roundFull">
    <template #header-left><div style='margin-left: 18px;font-size: 20px;font-weight: bold'>我爱妍妍</div></template>
    <h3>妍妍,我爱你呦</h3>
    <ul>
      <li>我想跟妍妍在一起</li>
      <li>我喜欢妍妍</li>
      <li>我还喜欢小TMIS</li>
    </ul>
    <xueyan-button type="danger" :name="'count is '+count" @click="count++"></xueyan-button>
    <xueyan-button type="danger" plain @click="showMessage">点击弹出信息提示</xueyan-button>
  </xueyan-card>
  <br><br>
  WangEditor富文本编辑器
  <xueyan-wangeditor v-model="richText"></xueyan-wangeditor>
  <div class="card">
    <p>
      Edit
      <code>components/HelloWorld.vue</code> to test HMR
    </p>
  </div>

  <p>
    Check out
    <a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
      >create-vue</a
    >, the official Vue + Vite starter
  </p>
  <p>
    Install
    <a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
    in your IDE for a better DX
  </p>
  <p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
</template>

<style scoped>
.read-the-docs {
  color: #888;
}
</style>
